import Vue from 'vue'
import App from './App.vue'
import router, { setupRouter } from './router'
import { setupCustomComponents } from '@/plugins/index.js'
import '@/plugins/elementui.js'
import store from '@/store'
import i18n from './lang'
import 'normalize.css'

Vue.config.productionTip = false

// 注册全局element-ui组件
// setupElementUI(i18n)
// 注册全局自定义组件
setupCustomComponents(Vue)
// 挂载路由
setupRouter(Vue)

const app = new Vue({ router, store, i18n, render: h => h(App) })
// 路由准备就绪后挂在App实例
router.onReady(() => app.$mount('#app'))
